package atguigu.shuzixiangguan;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Date;

public class FenyeMain {

	public static void main(String[] args) {
		int i = BigDecimal.valueOf((double) 8 / 624 * 100)//
				.setScale(2, BigDecimal.ROUND_HALF_UP)//
				.intValue();//
		System.out.println(i);
	}

	public static void test(){
		long count = 688L;
		if (count > 100) {
			long v = count / 100;
			long v1 = count % 100;
			if (v1 == 0) {
				for (int i = 1; i <= v; i++) {
					System.out.println(v);
				}
			} else {
				for (int i = 1; i <= v + 1; i++) {
					System.out.println(i);
				}
			}
		} else {

		}
	}


	public static final SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public Date beginOfYesterDay() throws ParseException {
		LocalDate today = LocalDate.now();
		LocalDate yesterDay = today.plusDays(-1);
		String be = yesterDay + " 00:00:00";
		Date begin = date.parse(be);
		return begin;
	}

	public Date endOfYesterDay() throws ParseException {
		LocalDate today = LocalDate.now();
		LocalDate yesterDay = today.plusDays(-1);
		String en = yesterDay + " 23:59:59";
		Date end = date.parse(en);
		return end;
	}
}
